.container {
  display: flex;
  width: 100%;
  min-width: 768px;
  flex-direction: column;
  margin: 0 auto;

  @media (max-width: 720px) {
    min-width: 0;
  }

  input::-webkit-outer-spin-button,
  input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
  }

  select {
    appearance: none;
  }

  .filename {
    &:not(:empty)::after {
      content: ".png";
    }
    flex-direction: row;
    flex-grow: 2;
    align-items: center;
    justify-content: center;
    border: none;
    margin-right: 180px;
    cursor: text;
    font-size: 14px;
    font-weight: 500;
    outline: none;
    text-align: center;
    transition: color 0.3s ease-in-out;

    input {
      border: 1px solid transparent;
      background: transparent;
      color: rgba(255, 255, 255, 0.4);
      &:hover,
      &:focus {
        border: 1px solid transparent;
        background: transparent;
      }
    }

    svg {
      width: 16px;
      height: 16px;
      opacity: 0;
    }

    @media (max-width: 720px) {
      display: none;
    }
  }

  .content {
    position: relative;
    overflow: auto;

    height: 100%;
    min-height: 512px;
    flex-grow: 2;
    color: rgba(255, 255, 255, 0.4);

    @media (max-width: 720px) {
      overflow: hidden;
    }
  }

  .redoButton {
    margin-left: -8px;
  }

  .redoButton,
  .undoButton {
    @media (max-width: 720px) {
      /* Make clickable area larger on mobile */
      padding: 15px;
      .label {
        display: none;
      }
    }
  }

  .aboutButton {
    &:after {
      display: block;
      content: "";
    }
    margin-top: 16px;
    font-size: 13px;
    line-height: 16px;

    & + & {
      margin-top: 8px;
    }
  }

  .preview {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    width: 512px;
    height: 512px;
    align-items: center;
    justify-content: center;
    background: url("./assets/bg.png") repeat;
    transform: translate(-50%, -50%);
  }

  .scaleContainer {
    position: relative;
    display: flex;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    margin: 3.125%;

    svg {
      width: auto;
      height: auto;
    }
  }

  .dimensions {
    position: absolute;
    z-index: 2;
    top: calc(100% + 8px);
    display: flex;
    min-width: 70px;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
    font-weight: 500;
    line-height: 13px;
    text-align: center;
  }

  .separator {
    width: 1px;
    height: 16px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
  }

  .actions {
    position: absolute;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    &.actionsLeft {
      display: none;

      @media (min-width: 1024px) {
        left: 16px;
        display: flex;
      }
    }
  }

  .panelHandle {
    position: absolute;
    z-index: 2;
    top: 32px;
    display: none;
    width: 64px;
    height: 64px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: #232526;
    opacity: 1;
    transform: opacity 0.3s ease-in-out;

    &.panelHandleLeft {
      left: calc(100% - 1px);
      border-radius: 0 12px 12px 0;
      border-left: 0;
    }

    &.panelHandleRight {
      right: calc(100% - 1px);
      border-radius: 12px 0 0 12px;
      border-right: 0;
    }

    &.hidden {
      opacity: 0;
    }

    @media (max-width: 720px) {
      display: block;
    }
  }

  .panel {
    position: absolute;
    z-index: 2;
    top: 24px;
    display: flex;
    width: 320px;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    background: #232526;
    transition: transform 0.3s ease-in-out;
    user-select: none;

    &.hidden {
      display: none;
    }

    &.icons {
      position: relative;
      left: 24px;
      height: calc(100vh - 102px);
      padding-bottom: 0;
      gap: 16px;

      h4 {
        margin-top: 8px;
        color: rgba(255, 255, 255, 0.4);
        font-size: 13px;
        font-weight: 500;
        line-height: 16px;
      }

      .panelHandle {
        left: calc(100% - 1px);
      }

      @media (max-width: 720px) {
        left: 0;
        transform: translateX(-100%) scale(0.96);
        &.opened {
          box-shadow: 1px 0px 0px 500px rgb(0 0 0 / 75%);
          transform: translateX(0) scale(1);
        }
      }
    }

    &.options {
      right: 24px;
      height: calc(100vh - 200px);
      padding: 0;

      .panelHandle {
        right: calc(100% - 1px);
      }

      @media (max-width: 720px) {
        right: 0;
        transform: translateX(100%) scale(0.96);
        &.opened {
          box-shadow: -1px 0px 0px 500px rgb(0 0 0 / 75%);
          transform: translateX(0) scale(1);
        }
      }
    }

    .inner {
      overflow: auto;
      width: 100%;
      padding: 16px;
    }

    &.icons,
    &.options {
      @media (max-width: 720px) {
        z-index: 5;
        top: 0;
        bottom: 0;
        width: 90%;
        height: calc(100vh - 54px);
      }
    }
  }

  .logoButton {
    display: flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    outline: none;

    transition:
      color 0.3s ease-in-out,
      background-color 0.3s ease-in-out,
      border-color 0.3s ease-in-out;

    &:hover {
      border-radius: 6px;
      background: rgba(255, 255, 255, 0.1);
    }
  }

  .about {
    position: absolute;
    z-index: 30;
    top: 64px;
    left: 24px;
    display: flex;
    overflow: auto;
    width: 322px;
    height: calc(100vh - 102px);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    background: #1f2023;
    box-shadow: 0px 8px 48px -16px #000000;

    h4 {
      margin-bottom: 16px;
      color: rgba(255, 255, 255, 0.4);
      font-size: 13px;
      line-height: 16px;
    }

    @media (max-width: 720px) {
      top: 54px;
      right: 0;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 100%;
    }
  }

  .aboutShadow {
    position: absolute;
    z-index: 10;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.75);
  }

  .aboutIconGenerator {
    padding: 24px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 24px;

    & > p {
      color: rgba(255, 255, 255, 0.6);
      font-size: 13px;
      line-height: 20px;
      & + p {
        margin-top: 16px;
      }
    }
  }
  .copyright {
    display: flex;
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.2);
    font-size: 13px;
    font-weight: 400;
    line-height: 16px;
    div {
      flex-grow: 2;
    }
  }

  .shortcut {
    display: flex;
    width: 100%;
    flex-direction: row;
    label {
      flex-grow: 2;
      color: #ffffff;
      font-size: 13px;
      line-height: 16px;
    }
    & + & {
      margin-top: 16px;
    }
  }

  .kbd {
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    padding: 0px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    line-height: 13px;
    text-align: center;
    & + .kbd {
      margin-left: 2px;
    }
  }

  .scrollWrapper {
    width: calc(100% + 26px);
    padding: 0 13px;
    margin: 0 -13px;
  }

  .iconsWrapper {
    display: grid;
    padding-bottom: 16px;
    gap: 8px;
    grid-template-columns: repeat(4, 1fr);
  }

  .emptyIconsListIcon {
    width: 24px !important;
    height: 24px !important;
  }

  .emptyIconsList {
    display: flex;
    width: 100%;
    flex-direction: column;
    flex-grow: 2;
    align-items: center;
    justify-content: center;
    gap: 8px;
    a {
      color: rgba(255, 255, 255, 0.6);
      transition: color 0.3s ease-in-out;

      svg {
        display: inline-flex;
        width: 16px;
        height: 16px;
        transition: transform 0.3s ease-in-out;
        vertical-align: middle;
      }
      &:hover {
        color: rgba(255, 255, 255, 1);
        svg {
          transform: translateX(0.1em);
        }
      }
    }
  }

  .icon {
    display: flex;
    width: 100%;
    height: auto;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 4px;
    aspect-ratio: 1/1;

    background: rgba(255, 255, 255, 0.05);
    color: white;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease-in-out;
    &:hover {
      background: rgba(255, 255, 255, 0.15);
    }
    &:has(:checked) {
      border: 1px solid #ffffff;
    }

    input {
      position: absolute;
      appearance: none;
      opacity: 0;
    }
  }

  .selectedIcon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .section {
    width: 100%;

    summary {
      &::marker,
      &::-webkit-details-marker {
        display: none;
      }
      position: relative;
      display: flex;
      width: 100%;
      height: 32px;
      flex-direction: row;
      align-items: center;
      padding: 0px 16px;
      border-radius: 6px;
      margin-bottom: 12px;

      background: #343434;
      color: #ffffff;
      cursor: pointer;

      font-size: 13px;
      gap: 12px;
      outline: none;

      .closed {
        display: none;
      }
      .opened {
        display: block;
      }

      &:focus-visible {
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4);
      }

      svg {
        position: absolute;
        top: 50%;
        right: 16px;
        width: 16px;
        height: 16px;
        color: rgba(255, 255, 255, 0.4);
        transform: translateY(-50%);
      }
    }

    &[open] summary {
      .closed {
        display: block;
      }
      .opened {
        display: none;
      }
    }

    & > div {
      padding-bottom: 20px;
    }
  }

  .formItem {
    display: flex;
    min-height: 36px;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 0 8px;

    transition: opacity 0.15s ease-in-out;

    &.disabled {
      opacity: 0.4;
      pointer-events: none;
    }

    & > span {
      flex-grow: 2;
      color: rgba(255, 255, 255, 1);
      font-size: 13px;
    }

    & + .formItem {
      margin-top: 12px;
    }
  }

  .searchWrapper {
    display: flex;
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .searchInputWrapper {
    position: relative;
    display: inline-flex;
    flex-grow: 2;
    svg {
      position: absolute;
      z-index: 2;
      top: 12px;
      left: 16px;
      width: 16px;
      height: 16px;
    }
  }

  input.searchInput {
    position: relative;
    width: 100% !important;
    height: 36px !important;
    align-items: center;
    padding: 0px 16px 0 44px !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    background: #343434;

    transition:
      color 0.3s ease-in-out,
      background-color 0.3s ease-in-out,
      border-color 0.3s ease-in-out;

    &::placeholder {
      color: rgba(255, 255, 255, 0.4);
    }
    &::before {
      position: absolute;
      top: 0;
      left: 0;
      content: "123";
    }

    &:hover,
    &:focus {
      border: 1px solid rgba(255, 255, 255, 0.4);
    }

    @media (max-width: 720px) {
      /* Prevent page zoom on input focus*/
      font-size: 16px;
    }
  }

  .uploadCustomIconFileInput {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    cursor: pointer;
    opacity: 0;
  }

  .scale {
    position: absolute;
    z-index: 3;
    right: 24px;
    bottom: 24px;

    select {
      background: rgba(255, 255, 255, 0.1);
      font-size: 14px;
    }

    .selectWrapper {
      svg {
        width: 26px;
        padding-left: 10px;
        border-left: 1px solid rgba(255, 255, 255, 0.2);
      }
    }
  }

  .inputWrapper {
    position: relative;
    display: inline-flex;
  }

  .selectWrapper {
    svg {
      position: absolute;
      top: 50%;
      right: 16px;
      width: 16px;
      height: 16px;
      transform: translateY(-50%);
    }
  }

  .inputWithUnit {
    input {
      padding-right: 35px;
    }
  }

  .unit {
    position: absolute;
    top: 50%;
    right: 16px;
    color: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%);
  }

  /* Reset button style */
  .popoverTrigger {
    all: unset;
  }

  .colorExample {
    width: 20px;
    height: 20px;
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    margin-left: -4px;
  }

  .transitionEnter {
    opacity: 0;
  }

  .transitionEnterActive {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
  }

  .transitionExit {
    opacity: 1;
  }

  .transitionExitActive {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
  }

  .presets {
    display: flex;
    flex-wrap: wrap;
    padding: 0 8px;
    gap: 16px;
  }

  .preset {
    position: relative;
    overflow: hidden;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border-radius: 5px;

    &:has(:checked),
    &:has(:focus) {
      box-shadow: 0 0 0 1px white;
    }

    svg {
      width: auto;
      height: auto;
      border-radius: inherit;
    }

    input {
      position: absolute;
      width: 100%;
      height: 100%;
      appearance: none;
      inset: 0;
      opacity: 0;
    }
  }

  .infoMessage {
    position: absolute;
    bottom: 40px;
    left: 50%;
    display: flex;
    height: 40px;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 6px 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 14px;
    font-weight: 400;
    gap: 16px;
    line-height: 17px;
    transform: translateX(-50%);

    .undoLastAction {
      border: 0;
      color: #ff6363;
      font-size: 14px;
      font-weight: 500;
      line-height: 17px;
      outline: none;
    }
  }

  .dropZone {
    position: absolute;
    z-index: 10;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 36px;
    text-align: center;
  }

  .dropZoneIndicator {
    position: absolute;
    top: calc(50% + 26px);
    left: 50%;
    display: flex;
    width: 512px;
    height: 512px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 64px;

    background: #17191a;
    box-shadow: 0px 0px 0px 24px rgba(255, 255, 255, 0.05);
    gap: 16px;
    transform: translate(-50%, -50%);
  }

  .dropZoneMessage {
    max-width: 203px;
    animation: shine 1.5s ease-in-out infinite;
    background: linear-gradient(
        92.74deg,
        rgba(255, 255, 255, 0) 4.57%,
        rgba(255, 255, 255, 0.6) 65.86%,
        rgba(255, 255, 255, 0) 95.43%
      ),
      rgba(255, 255, 255, 0.2);
    background-clip: text;
    background-size: 200% auto;

    color: transparent;
    font-size: 13px;

    font-weight: 500;
    line-height: 20px;
    text-align: center;
    -webkit-text-fill-color: transparent;
    @keyframes shine {
      to {
        background-position: -200% center;
      }
    }
  }

  .mobileShareWrapper {
    display: none;

    @media (max-width: 720px) {
      display: flex;
    }
  }
}
